/*
 * Copyright 2009 fearsomeJ.org
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.fearsomej.jayme;

import org.fearsomej.jayme.process.ExecutionContext;
import org.fearsomej.jayme.process.JaymeProcess;

/**
 * 
 * @author Kevin Beddingfield
 *
 */
public final class Jayme {
	private static final Jayme singleInstance = new Jayme();
	
	private Jayme() {
		//initialize Process Registry
	}
	
	public static Jayme getInstance() {
		return singleInstance;
	}
	
	/**
	 * Looks up a JaymeProcess by name and calls 
	 * {@link Jayme#executeProcess(ExecutionContext, JaymeProcess)}
	 * with the fetched process.
	 * 
	 * @param context the context under which to execute the process
	 * @param processName the name of the process to look up
	 * @return the same context that was sent in after being manipulated by the process (not guaranteed
	 * to reference the same instance)
	 */
	public ExecutionContext executeProcess(ExecutionContext context, String processName) {
		return null;
	}
	
	/**
	 * Executes a {@link JaymeProcess}
	 * 
	 * @param context context the context under which to execute the process
	 * @param process the parent {@link JaymeProcess} to execute
	 * @return the same context that was sent in after being manipulated by the process (not guaranteed
	 * to reference the same instance)
	 */
	public ExecutionContext executeProcess(ExecutionContext context, JaymeProcess process) {
		return null;
	}
}
